<?php

/*
	Admininistration menu widget
*/

#doc
#	classname:	AdminMenu
#	scope:		Admin
#
#/doc

class AdminMenu extends CWidget
{
	#	internal variables
	public $items=array();
	
	#	active css class to highlight active menu item
	public $activeCssClass='current';
	
	#	name of menu field
	public $nameId='main';
	
	#	Run this windget
	public function run ()
	{
		for ($i = 0; $i < 16; $i++) {
			$this->items[$i]="";
		}
		$activeCssClass=$this->nameId;
		switch ( $activeCssClass )
		{
			case 'main':
				$this->items[0]='current';
			break;
			
			case 'news':
			{
				$this->items[1]='current';
			}
			break;
			
			case 'newslist':
			{
				$this->items[2]='current';
			}
			break;
			case 'postadd':
			{
				$this->items[3]='current';
			}
			break;
			case 'postlist':
			{
				$this->items[4]='current';
			}
			break;
			case 'categorylist':
			{
				$this->items[5]='current';
			}
			break;
			case 'addcategory':
			{
				$this->items[6]='current';
			}
			break;
			case 'addcategorypost':
			{
				$this->items[7]='current';
			}
			break;
			case 'editcategorypost':
			{
				$this->items[8]='current';
			}
			break;
			case 'userlist':
			{
				$this->items[9]='current';
			}
			break;
			case 'scope':
			{
				$this->items[10]='current';
			}
			break;
			case 'addscope':
			{
				$this->items[11]='current';
			}
			break;
			case 'addinformation':
			{
				$this->items[12]='current';
			}
			break;
			case 'listinformation':
			{
				$this->items[13]='current';
			}
			break;
			case 'categorylistInf':
			{
				$this->items[14]='current';
			}
			break;
			case 'addcategoryInf':
			{
				$this->items[15]='current';
			}
			break;
			case 'partners':
			{
				$this->items[16]='current';
			}
			break;
			case 'partnerslist':
			{
				$this->items[17]='current';
			}
			break;
					
			default:
				# code...
			break;
		}
		$this->render('qmenu',array('activeCssClass'=>$activeCssClass,'items'=>$this->items));
	}

}

?>